/*
Integer类以友元形式重载逻辑非运算符！
0
1

 */
#include<iostream>
using namespace std;

class Integer{
	private:
		int m_i;
	public:
		Integer(int i): m_i(i){}
		friend const bool operator!(const Integer& i){
			if(i.m_i == 0){
				return true;
			}else{
				return false;
			}
		}
};

int main(){
	Integer i1(1);
	cout << !i1 << endl;

	Integer i2(0);
	cout << !i2 << endl;
	return 0;
}
